import { GridContent } from '@ant-design/pro-layout';
import { forwardRef } from 'react';
import { useModel } from 'umi';
import { Spin } from 'antd';
// import { parse } from 'qs';
import './loadding.css';
const GridContentLocal: any = forwardRef((props) => {
  // // eslint-disable-next-line @typescript-eslint/no-unused-vars
  // const params: any = parse(window.location.search, { ignoreQueryPrefix: true });
  //
  // // eslint-disable-next-line @typescript-eslint/no-unused-vars
  const globaldata = useModel('globaldata');
  return (
    <GridContent>
      {/*@ts-ignore*/}
      <div className={'g_loadding_container'} hidden={!globaldata.loadding}>
        <Spin size="large" className={'g_loadding_item'} />
      </div>
      {props.children}
    </GridContent>
  );
});

export default GridContentLocal;
